% N2STRUCT - convert numeric array to a structure
%
%    Y = N2STRUCT(X, F, T) converts the UINT8 array X to a
%    structure Y.  The field names are stored in the cell
%    array F, and the type of data to be read for each field
%    is stored in a corresponding cell array T.
%
%    Each entry in the cell array T must be a valid FREAD
%    precision format string ('char', 'int', 'double', etc).
%
%    To read an array of consecutive values into a single
%    structure field, the precision format string should
%    include an integer M for an M vector, or two integer
%    values M and N for an M x N array.  These values must
%    follow the precision format, and should be separated
%    by spaces.
%
%    If a value in the UINT8 array X is not to be saved to
%    the structure Y, provide an empty string as the field
%    name.
%
%    Ex:	X = uint8([1 2 3 4 0 0 0 0 65 66 67])
%       F = {'number', '', 'string'}
%       T = {'uint8 4', 'uint32', 'char 3'}
%
%       Y = n2struct(X, F, T)
%          Y.number = [1 2 3 4]
%          Y.string = 'ABC'

% By:   S.C. Molitor (smolitor@bme.jhu.edu)
% Date: May 12, 1999

% MEX file.
